package org.linlinjava.litemall.db.models;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;

@Getter
@Setter
@ToString
@EqualsAndHashCode(callSuper = false)
@TableName(value = "t_topic", autoResultMap = true)
public class Topic extends BaseModel{

    @TableField("title")
    private String title;

    @TableField("subtitle")
    private String subtitle;

    @TableField("price")
    private BigDecimal price;

    @TableField("read_count")
    private String readCount;

    @TableField("pic_url")
    private String picUrl;

    @TableField("sort_order")
    private Integer sortOrder;

    @TableField(value = "goods", typeHandler = JacksonTypeHandler.class)
    private Integer[] goods;


    @TableField("content")
    private String content;
}